import axios from '@/libs/api.request'

export const login = ( data ) => {
  return axios.request({
    url: 'user/login/',
    data: data,
    method: 'post'
  })
}


export const register = (name,check_password,email,phone) => {
  return axios.request({
    url: '/user/register/',
    data: {'username':name,'password':check_password,'email':email,'phone':phone},
    method: 'post'
  })
}

export const check_token = (token) => {
  return axios.request({
    url: 'check_token/',
    params: {token: token},
    method: 'get'
  })
}
